from rest_framework.serializers import ModelSerializer
from user.models import *


class CateSer(ModelSerializer):
    class Meta:
        model = Category
        fields = '__all__'


class GoodSer(ModelSerializer):
    class Meta:
        model = Goods
        fields = '__all__'


class CartSer(ModelSerializer):
    class Meta:
        model = Cart
        fields = '__all__'


class ShowCartSer(ModelSerializer):
    good = GoodSer()

    class Meta:
        model = Cart
        fields = '__all__'


class OrderSer(ModelSerializer):
    class Meta:
        model = OrderInfo
        fields = '__all__'


class DOrderSer(ModelSerializer):
    class Meta:
        model = OrderDetail
        fields = '__all__'
